package com.hiwhitley.algorithm;

/**
 * Created by hiwhitley on 2016/9/27.
 */
public class CompleteNum {
    public static void main(String[] args) {
        int m, j, s;
        for (m = 2; m <= 1000; m++) {
            s = 0;
            for (j = 1; j <= m / 2; j++) {
                if (m % j == 0) s += j;
            }
            if (m == s)
                System.out.print(m + " ");
        }
    }
}
